package com.pai4j.domain.vo;

import lombok.Data;

import java.util.List;

@Data
public class OpenApiDetailVO {
    private Long id;
    private String apiId;
    private String name;
    private String description;
    private String definition;
    private String jsonpDefinition;
    private String httpMethod;
    private String requestExample;
    private String responseExample;
    private String version;
    private Integer status;
    private String remark;

    private List<AuthParamVO> authParams;
    private List<RequestParamVO> requestParams;
    private List<ResponseFieldVO> responseFields;

    @Data
    public static class AuthParamVO {
        private Long id;
        private String paramKey;
        private String paramName;
        private String paramType;
        private Integer required;
        private String fieldDesc;
        private String example;
        private Integer sortNo;
    }

    @Data
    public static class RequestParamVO {
        private Long id;
        private String paramName;
        private String paramType;
        private Integer required;
        private String fieldKey;
        private String description;
        private String example;
        private String defaultValue;
        private Integer sortNo;
    }

    @Data
    public static class ResponseFieldVO {
        private Long id;
        private String fieldName;
        private String fieldType;
        private String fieldDesc;
        private String example;
        private String parentField;
        private Integer sortNo;
    }
}
